﻿
using UnityEngine;

namespace UFrame
{
    public class USystemPop:MonoBehaviour
    {
        public float speed = 50f;
        public float disappearTime = 1.5f;
        public float counter = 0f;
        public void Update()
        {
            var pos = transform.position;
            pos.y += speed * Time.deltaTime;
            transform.position = pos;

            counter += Time.deltaTime;
            if (counter >= disappearTime)
            {
                counter = 0;
                gameObject.SetActive(false);
                DestroyImmediate(this.gameObject);
            }

        }
    }
}